<?php

return array(
	"prepare" => '
class staticClass {
	public static $var1 = 5;
	private static $var2 = 5;
	
	public static function m1() {
		if(rand(0, 1)) return rand(1, 2);
		else return rand(2, 3);
	}
	private static function m2() {
		if(rand(0, 1)) return rand(1, 2);
		else return rand(2, 3);
	}
	public static function caller($iters = 1000) {
		Util::timer(2);
		for($i = 0; $i < $iters; $i++) {
			self::m2();
		}
		return Util::timer(2);
	}
	public static function callerVar($iters = 1000) {
		$c = 0;
		Util::timer(5);
		for($i = 0; $i < $iters; $i++) {
			$c += self::$var2;
		}
		return Util::timer(5);
	}
	function m3() {
		if(rand(0, 1)) return rand(1, 2);
		else return rand(2, 3);
	}
}

class exClass {
	public function m1() {
		if(rand(0, 1)) return rand(1, 2);
		else return rand(2, 3);
	}
	private function m3() {
		if(rand(0, 1)) return rand(1, 2);
		else return rand(2, 3);
	}
	function m6() {
		if(rand(0, 1)) return rand(1, 2);
		else return rand(2, 3);
	}
}',
	"tests" => array(
		array(
			"code" => 'staticClass::m1();',
			"i" => 1000,
			"desc" => "public static method",
		),
		array(
			"code" => 'staticClass::caller(1000); // 1000 calls inside',
			"desc" => "private static method",
		),
		array(
			"code" => 'staticClass::m3();',
			"i" => 1000,
			"desc" => "Метод с неопределённым уровнем доступа ( function method() { ... } )",
		)
	)
);
?>
